<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>消息测试</title>
<link rel="stylesheet" type="text/css" href="resources/css/comm.css">
</head>
<body>
<div>
	<a href="index.html">返回</a>
	<hr>
	<div id="commonPanel"></div>
	<hr>
	<div>
		<p>新增或修改用户分组规则</p>
		<p>分组编码：<input type="text" id="sysNo" value="test"></p>
		<p>分组名称：<input type="text" id="groupId" value="sys"></p>
		<p>分组类型：<input type="text" id="userId" value="123456"></p>
		<p>接收状态：<input type="text" id="status" value="10"> [10打开、20关闭]</p>
		<p>发送邮件：<input type="text" id="emailStatus" value="10"> [10打开、20关闭]</p>
		<p>发送短信：<input type="text" id="smsStatus" value="10"> [10打开、20关闭]</p>
		<p>接收手机：<input type="text" id="recePhone" value="13756876543;13897641025">  [多个用;分隔]</p>
		<p>接收邮箱：<input type="text" id="receEmail" value="test1@qq.com;test2@qq.com">  [多个用;分隔]</p>
		<p>
			<input type="button" id="save" value="提交">
			<span id="msg" style="color: green;font-size: 12px;"></span>
		</p>
	</div>
</div>
<script type="text/javascript" src="resources/js/jquery.min.js"></script>
<script type="text/javascript" src="resources/js/md5.js"></script>
<script type="text/javascript" src="resources/js/msg.js"></script>
<script type="text/javascript">
$(function() {
	$('#save').click(function() {
		var sysNo = $('#sysNo').val();
		var groupId = $('#groupId').val();
		var userId = $('#userId').val();
		var status = $('#status').val();
		var emailStatus = $('#emailStatus').val();
		var smsStatus = $('#smsStatus').val();
		var recePhone = $('#recePhone').val();
		var receEmail = $('#receEmail').val();
		api.userGroupRule.saveOrUpdate(sysNo, groupId, userId,
				status, emailStatus, smsStatus, recePhone, receEmail, function(json) {
			if(json.code == 0) {
				$('#msg').html('添加信息成功');
			} else {
				alert(json.message);
			}
		});
	});
});
</script>
</body>
</html>